package com.kingyun.gpsinspection.purificationservice.facade.service.iam.adm;

import com.alibaba.fastjson.JSONObject;
import com.kingyun.gpsinspection.purificationservice.facade.model.BootstrapSearchBean;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.adm.VacationApply;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.EmployeeVo;

import java.util.List;

/**
 * 休假服务层
 * created by lutinabo 2016/12/13
 */
public interface VacationApplyService {

    /**
     * 查询列表
     *
     * @param vacationApply 请假实体
     * @return
     */
    JSONObject list(VacationApply vacationApply);

    /**
     * 删除请假申请
     *
     * @param vacationApplyId 请假id
     * @return
     */
    int deleteByPrimaryKey(String[] vacationApplyId);

    /**
     * 新增请假申请
     *
     * @param record 请假实体
     * @return
     */
    int insertSelective(VacationApply record) throws Exception;

    /**
     * 根据id查询请假申请
     *
     * @param vacationApplyId 请假id
     * @return
     */
    VacationApply selectByPrimaryKey(String vacationApplyId);

    /**
     * 根据id更新并处理请假申请
     *
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(VacationApply record, EmployeeVo employeeVo);

    /**
     * 代办查找
     *
     * @param bootstrapSearchBean
     * @return
     */
    List<Object> searchByPIId(BootstrapSearchBean bootstrapSearchBean);

    /**
     * 代办总条数
     *
     * @param bootstrapSearchBean
     * @return
     */
    int totalCountByPIId(BootstrapSearchBean bootstrapSearchBean);

    /**
     * 查询我已经审批的
     *
     * @param vacationApply
     * @return
     */
    JSONObject processed(VacationApply vacationApply);

    /**
     * 待我审批的请假
     *
     * @param vacationApply 查询条件
     */
    JSONObject listToDoTask(VacationApply vacationApply);
}
